var WxParse = require('../../wxParse/wxParse.js');
var app = getApp()
Page({
  data: {
    levelInfo: {}
  },
  onLoad: function (e) {
    var that = this;
    if (!app.globalData.plumSession) {
      app.wechatSq(that);
    } else {
      that.requestDetail();
    }
  },
  requestDetail: function () {
    var that = this;
    //发起请求，获取等级配置中心
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: app.globalData.requestUrl,
      data: {
        map: 'applet_three_member_level',
      },
      success: function (res) {
        if (res.data.ec == 200) {
          that.setData({
            levelInfo: res.data.data
          })
          // 富文本解析
          var article = res.data.data.into;
          WxParse.wxParse('article', 'html', article, that, 5);
        }
      },
      complete: function () {
        wx.hideLoading();
      }
    });
  },
})